/**
 * Created by Administrator on 2016/11/28.
 */
$(".form-date").datetimepicker(
    {
        language:  "zh-CN",
        weekStart: 1,
        todayBtn:  1,
        autoclose: 1,
        todayHighlight: 1,
        startView: 2,
        minView: 2,
        forceParse: 0,
        format: "yyyy-mm-dd"
    });
/**
 * Created by Administrator on 2016/11/15.
 */
$(function () {
        initDom();
        initEvent();
})

function initDom() {

        $("#kinds-content").hide();
        $("#qhTable_account").bootstrapTable({
                height: "900px",
                url: "workType.json",
                onExpandRow: orderGoodsFun
        });
        $(".fixed-table-header table").css("display","");
        $("#qhTable_account").css("display","");
        $(".fixed-table-body table").css('margin-top', '0');
        $(".fixed-table-toolbar .fixed-table-container").css({"padding-bottom": "0"});

}
function orderGoodsFun(index, row, detail) {
        console.log("展开行：" + index + "   整行的值是：");
        console.log(row);
        $.getJSON("goods/data.json?", function (response) {
                var htmlStr=template('goodsTplScript', response);
                detail.html(htmlStr);
        });
}
function initEvent() {
  $(".new-project").on("click",function(){

  }
)

}


function totalFormatter(value, row, index) {
        return "<a href='#' onclick='myClick()'>删除</a>";
}

function myClick(){
}

function myQueryParams(params) {
        params["pageNum"] = (params.offset / params.limit) + 1;
        params.pageSize = params.limit;
        params.derection = "asc";
        params.sort = "id";

        params.orderCode = $("#orderCode").val() + "";
        return params;
}

function responseHandler(res) {
        var needData = {
                rows: res.data.list,
                total: res.data.total
        };
        return needData;
}





